The multi-mirror rule is one of two multi-directional rules offered in SureSync. This rule method will synchronize additions, modifications and deletions which occur on any path in the job to all the other paths in the job. For example, assume you are running a multi-mirror between three servers named ServerA, ServerB and ServerC. If a user adds a file named Document1.doc to ServerA then ServerB and ServerC will receive a copy of Document1.doc when the synchronization is run. If another user modifies Document1.doc on ServerB later in the day, the updated copy will be synchronized to ServerA and ServerC. Deletions are handled in the same manner, a delete on one path is deleted from all other paths. The end result is all paths involved in the synchronization have the exact same content.
The difference between a Multi-Mirror rule and an Exchanging Copies rule is simple. With a Multi-Mirror, deletes are propagated. With an Exchange Copies rule, deletes are not allowed. If a file is deleted from one side, it will be copied back from another one of the paths.
Multi-directional rules have a special situation which must be considered called a multiple update. If two users change the same file on multiple paths before SureSync can perform a synchronization, a conflict is created. The likelihood of such a conflict occurring depends on how frequently the synchronization job is run. For example, a Schedule run once a day has a much higher likelihood of encountering this problem than a Real-Time Monitor which is constantly synchronizing changes.
How does SureSync handle a multiple update situation? Three options are available. The default behavior is to log an error and suppress the synchronization. This allows the administrator to select a version to keep or merge the changed files together. A second option will select the file with the most recent time and date stamp. This file "wins" and is synchronized over all other copies. Finally, SureSync offers the SPIAgent File Locking Add-on which eliminates this problem entirely. When a user opens a file on one path, the file is locked on all other paths. This means only one user can change a particular file at once.
Please note:
The multi-mirror rule is the only multi-directional rule which propagates deletions.
The first time a multi-mirror rule is run, SureSync will not perform any deletions. If a file exists on one path and not the others, the file will be synchronized to all other paths. This ensures that all paths involved have the exact same files. Again, no files will be deleted during the first run of a multi-mirror rule. You may wish to use the Preview mode to verify that the actions it will perform during that first synchronization are what you want and to override the ones that aren't. Deletions will start occurring after that first run has been completed and SureSync has generated file history.
The first time a multi-mirror rule is run, if SureSync encounters the same file in the same directory, the file with the newest time and date stamp will be synchronized. Once the file history has been generated, by default, you will begin to see the "file has changed in multiple locations" error if a multiple update situation occurs.
Understanding how a multi-mirror handles folder renames and deletions is important. SureSync will replicate folder renames and deletions with a Multi-Mirror rule. For example, if you rename FolderA to FolderB that change will be handled resulting in a FolderB on all paths and no FolderA being present. However, when many paths are involved in the synchronization a user could have a file open in a folder which is deleted or renamed on another machine. Assume that a synchronization involves ServerA, ServerB, and ServerC with a Multi-Mirror keeping a directory named SalesData synchronized. Under that SalesData folder is a folder named FolderA. A user on ServerB opens a file named Sales.doc under FolderA and is working on that file. On ServerA, a different user renames FolderA to FolderB. What happens? In this case, the change will be replicated to ServerC fine because none of the files are in use. ServerA will encounter a "the process cannot access the file because it is being used by another process" error on the file which is opened. The folder FolderB will be created with all the files in it and the FolderA will remain with the open Sales.doc file in it. The next run of the synchronization will result in FolderA with that changed Sales.doc folder being replicated back to ServerB and ServerC. This will result in FolderA existing on all machines with the single changed file in it and FolderB existing on all machines with the complete directory structure. This ensures that no changes are lost.
Possible Scenarios
Synchronize between a laptop and a desktop
A multi-mirror rule can be very helpful if you work between a laptop and a desktop. SureSync can be used with a multi-mirror to synchronize your document folders between the two machines. This ensures that you have the most recent version of all of your files on each machine, making it easy to work between multiple machines.
Synchronize web farms
A web farm consists of a number of different web servers that serve files for the same web site. If a server goes down, additional servers are available to serve the pages to the end user. SureSync with a multi-mirror rule can be used to ensure that all content from a web site is available on all machines in the web farm. For example, if a customer uploads a file to the web site, that uploaded file would be synchronized to all servers in the farm. A Real-Time Monitor is recommended for this type of scenario.
Collaborative file sharing
One of the most powerful solutions available through the use of a multi-mirror rule is collaborative file sharing. In this scenario, a copy of the file share is maintained in each office. The users in each office then access the files through their local file share. This eliminates the need for users to access files remotely over a slow WAN connection. In the background, SureSync synchronizes the changes that occur in each office to all the other offices. This ensures that the users in each office are always working off the most recent version of the files.
Summary Chart
The summary chart will give you a breakdown of how the Multi-Mirror rule functions when different events occur.
Event
Action Taken
If a file is added or changes on any path...
Add new files. Replace file on all other paths with a copy from source, if not yet identical.
If a file is deleted from any path...
Delete the file from all other paths.
If a file changes on multiple paths... *
Issue warning and do not copy, unless the copy latest option was selected.
If a file is added to a path for the first time (SureSync has no history for the file)
Add new file.
If different versions of a file are added multiple paths (SureSync has no history for the file)
Issue warning and do not copy, unless the copy latest option was selected